package com.bootdo.hotel.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import com.bootdo.common.annotation.NotColumn;
import com.bootdo.common.fansheutils.FansheUtils;
import com.bootdo.common.fansheutils.JibenLei;
import com.bootdo.common.utils.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.haojiangbo.annotation.HapiFeild;


/**
 * 产品配置
 * 
 * @author haojiangbo
 * @email 2100272728@qq.com
 * @date 2019-10-18 20:59:19
 */
 @JsonInclude(JsonInclude.Include.NON_NULL)
public class HotelProductConfig extends JibenLei {
	@NotColumn
	private static final long serialVersionUID = 1L;
	
	
	//id
	 @NotColumn 	@HapiFeild("id")
	private Long id;
	
	//名字
		@HapiFeild("名字")
	private String name;
	
	//适用房型
		@HapiFeild("适用房型")
	private String roomTypeList;
	@NotColumn
	private List roomTypeListArray;
	//房价码
		@HapiFeild("房价码")
	private Long dayMoneyId;
	
	//适用会员
		@HapiFeild("适用会员")
	private String memberLevelList;

	@NotColumn
	private List<String> 	memberLevelListArray;
	
	//酒店ID
		@HapiFeild("酒店ID")
	private Long hotelId;
	
	//酒店名称
		@HapiFeild("酒店名称")
	private String hotelName;
	
	//用户ID
		@HapiFeild("用户ID")
	private Long userId;
	
	//用户名称
		@HapiFeild("用户名称")
	private String userName;
	
	//创建时间
		@HapiFeild("创建时间")
	private Date createTime;

    public HotelProductConfig(){
    	this.hotelId = -1l;
    	this.hotelName ="";
    	this.createTime = new Date();
    }

	public List getRoomTypeListArray() {
		this.roomTypeListArray = new ArrayList<>();
		if(!StringUtils.isEmpty(this.roomTypeList)){
			String  r []  = this.roomTypeList.split(",");
			for(String item : r){
				this.roomTypeListArray.add(item);
			}
		}
		return roomTypeListArray;
	}

	public void setRoomTypeListArray(List roomTypeListArray) {
		this.roomTypeListArray = roomTypeListArray;
	}

	public List<String> getMemberLevelListArray() {
    	this.memberLevelListArray = new ArrayList<>();
    	if(!StringUtils.isEmpty(this.memberLevelList)){
			String  r []  = this.memberLevelList.split(",");
			for(String item : r){
				this.memberLevelListArray.add(item);
			}
		}
		return memberLevelListArray;
	}

	public void setMemberLevelListArray(List<String> memberLevelListArray) {
		this.memberLevelListArray = memberLevelListArray;
	}

	/**
	 * 设置：id
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * 获取：id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * 设置：名字
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * 获取：名字
	 */
	public String getName() {
		return name;
	}
	/**
	 * 设置：适用房型
	 */
	public void setRoomTypeList(String roomTypeList) {
		this.roomTypeList = roomTypeList;
	}
	/**
	 * 获取：适用房型
	 */
	public String getRoomTypeList() {
		return roomTypeList;
	}
	/**
	 * 设置：房价码
	 */
	public void setDayMoneyId(Long dayMoneyId) {
		this.dayMoneyId = dayMoneyId;
	}
	/**
	 * 获取：房价码
	 */
	public Long getDayMoneyId() {
		return dayMoneyId;
	}
	/**
	 * 设置：适用会员
	 */
	public void setMemberLevelList(String memberLevelList) {
		this.memberLevelList = memberLevelList;
	}
	/**
	 * 获取：适用会员
	 */
	public String getMemberLevelList() {
		return memberLevelList;
	}
	/**
	 * 设置：酒店ID
	 */
	public void setHotelId(Long hotelId) {
		this.hotelId = hotelId;
	}
	/**
	 * 获取：酒店ID
	 */
	public Long getHotelId() {
		return hotelId;
	}
	/**
	 * 设置：酒店名称
	 */
	public void setHotelName(String hotelName) {
		this.hotelName = hotelName;
	}
	/**
	 * 获取：酒店名称
	 */
	public String getHotelName() {
		return hotelName;
	}
	/**
	 * 设置：用户ID
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	/**
	 * 获取：用户ID
	 */
	public Long getUserId() {
		return userId;
	}
	/**
	 * 设置：用户名称
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}
	/**
	 * 获取：用户名称
	 */
	public String getUserName() {
		return userName;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}


	@Override
	@JsonIgnore
	public List<HashMap<String, Object>> getFields() {
		// TODO Auto-generated method stub
		return FansheUtils.getFieldList(this);
	}


}
